package com.xingkeduo.business.user.event;

/**
 * @Description:
 * @Author:gaozifeng
 * @Date 2019/7/18 11:24
 **/
public class MsgTempDTO extends EvenBaseDTO {

    private static String couponActiveEnd       = "抱歉，此活动已经结束";
    private static String onlyNewConsumer       = "抱歉，此活动仅限新用户参与。";
    private static String onlyOne               = "抱歉，您已经领取过本优惠，无法重复领取。";
    private static String NotSamePerson         = "抱歉，您不是此二维码邀请的用户，无法参与此活动。请让您朋友将邀请链接发送至您的微信。";
    private static String newConsumerMsgTemp    = "新人体验券已放入您的账户，赶紧下单使用吧！服务完成后，邀请您的好友也将获得一张优惠券。";

    private String content;

    //1新用户领券 2老用户发券(老用户动态推送消息)  3券已经发完 4只能是新用户 5只能领一次 6生成二维码用户和当前领取人不同
    public enum  PushTypeEnums{
        NEW_CONSUMER(1,"新人体验券已放入您的账户，赶紧下单使用吧！服务完成后，邀请您的好友也将获得一张优惠券。"),
        COUPON_END(3,"抱歉，此活动已经结束"),
        ONLY_NEW_CONSUMER(4,"抱歉，此活动仅限新用户参与。"),
        ONLY_ONE(5,"抱歉，您已经领取过本优惠，无法重复领取。"),
        NOT_SAME_PERSON(6,"抱歉，您不是此二维码邀请的用户，无法参与此活动。请让您朋友将邀请链接发送至您的微信。");

        private int value;
        private String desc;

        PushTypeEnums(int value) {
            this.value = value;
        }

        PushTypeEnums(int value,String desc) {
            this.value = value;
            this.desc = desc;
        }

        public String getDesc() {
            return desc;
        }

        public void setDesc(String desc) {
            this.desc = desc;
        }

        public int getValue() {
            return value;
        }

        public void setValue(int value) {
            this.value = value;
        }
    }

    public String getContent() {
        return content;
    }

    public MsgTempDTO setContent(PushTypeEnums pushTypeEnums) {
        switch (pushTypeEnums) {
            case NEW_CONSUMER:
                this.content = newConsumerMsgTemp;
                break;
            case COUPON_END:
                this.content = couponActiveEnd;
                break;
            case ONLY_NEW_CONSUMER:
                this.content = onlyNewConsumer;
                break;
            case ONLY_ONE:
                this.content = onlyOne;
                break;
            case NOT_SAME_PERSON:
                this.content = NotSamePerson;
                break;
            default:
                this.content = null;
                break;
        }
        return this;
    }

    public MsgTempDTO setContent(String content) {
        this.content = content;
        return this;
    }


}
